import { DataTypes } from 'sequelize'
import { sequelize } from '../../BaseDao'

class SecondCtgyModel {
  static createModel() {
    const model = sequelize.define(
      'secondctgy',
      {
        secondctgyid: {
          type: DataTypes.INTEGER,
          field: 'secondctgyid',
          primaryKey: true,
          autoIncrement: true
        },
        secctgyname: {
          type: DataTypes.STRING,
          field: 'secctgyname',
          allowNull: false
        },
        firstctgyId: {
          type: DataTypes.INTEGER,
          field: 'firstctgyId',
          allowNull: false
        }
      },
      {
        timestamps: false
        // freezeTableName: true
      }
    )
    return model
  }
}

export const secondCtgyModel = SecondCtgyModel.createModel()
